<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title><%= title %></title>
		<!--[if lt IE 9]>
			<script type="text/javascript" src="/webSite/js/html5.js"></script>
		<![endif]-->
	</head>
	<body>
		<div class="row">
			<input type="text" name="name" placeholder="请输入用户名"/>
			<input type="text" name="email" placeholder="请输入邮箱"/>
			<input type="password" name="password" placeholder="请输入密码"/>
			<div class="btn">注册</div>
		</div>
	</body>
	<script type="text/javascript" src="/webSite/js/jquery-2.1.0.js" ></script>
	<script>
		$(function(){
			$(".btn").click(function(){
				var data = {};
				$("input").each(function(){
					data[$(this).attr("name")] = $(this).val();
				});
				$.post("/register",data,function(data){
					if(data.state == "ok"){
						alert("注册成功!");
						window.location.href = "/";
					}else{
						alert(data.message);
					};
				},"JSON")
			})
		})
	</script>
</html>
